/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package objectoriented.polymorphism;

import objectoriented.abstraction.Animal;

/**
 *
 * @author peng
 */
public class Lion extends Animal{
    
    private String name;
    
    public Lion(String nm)
    {
        //calls super class constructor
        super("lion");
        name=nm;
    }

    //required method, 
    //overrides the one in its parent class
    @Override
    public void describe() {
        System.out.print("A "+getBreed()); 
        System.out.print(" named ");
        System.out.println(name);
    }
    
}
